import { ISchema } from '@formily/react'
import { ExpressionDialogSetter } from '@designable/formily-setters'

export const DetailHeader: ISchema = {
  type: 'object',
  properties: {
    title: {
      type: 'string',
      'x-decorator': 'FormItem',
      'x-component': 'Input',
      title: '标题',
      default: '标题',
    },
    titleKey: {
      type: 'string',
      'x-decorator': 'FormItem',
      'x-component': 'Input',
      title: '标题字段名',
      default: 'orderNo',
    },
    statusKey: {
      type: 'string',
      'x-decorator': 'FormItem',
      'x-component': 'Input',
      title: '状态字段名',
      default: 'orderStatus',
    },
    statusNameKey: {
      type: 'string',
      'x-decorator': 'FormItem',
      'x-component': 'Input',
      title: '状态名称字段名',
      default: 'orderStatusName',
    },
    statusColorExpression: {
      type: 'string',
      'x-decorator': 'FormItem',
      title: '状态颜色表达式',
      'x-component': ExpressionDialogSetter,
    },
  },
}
